<!Doctype html>
<html>
<head>
	<meta charset="utf-8" />
	<title></title>
	<style>
	</style>
</head>
<body>
	<script>
		var arr = ['aa','bb',1];

		function myPush (arr,pram) {
			var arr1 = [];   //arr1 = arr 错误
			for (var i = 0; i < arr.length; i++) {
				arr1[i] = arr[i];
			}
			for (var i = 0; i < arguments.length-1; i++) {
				arr1[arr1.length] = arguments[i+1];
			}
			return arr1;
		}
		var o = myPush(arr,'tom','jack','roby','rick','Ama');
		var x = myPush(arr,1,2,3,4,5,6,{a:1,b:2});
		console.log(o);
		console.log(x);
	</script>
</body>
</html>





